home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
dgbg100.zip
/
DGBG.DOC
next >
Wrap
Text File
|
1991-02-24
|
18KB
|
440 lines
┌── Thanks for considering DGBG! ──────────────────────────────┐
│ │
│ │
│ │
│ DGBG is The Darn Good Bulletin Generator │
│ ^ ^ ^ ^ │
│ Copyright 1991, Brian McCormick │
│ │
│ │
│ │
└───────────────────────────────────────────────── DGBG 1.00 ──┘
Distribution and Liability Statement:
This software is free, and may be distributed for free to other
people. Charging a fee for this software is a violation of the
author's copyright. As usual with software of this nature, no
warranty either stated or implied is offered. By using this
software, you agree that you assume all liability in connection
with its use or misuse.
What is DGBG?
DGBG was designed for the purpose of compiling a visually
appealing news bulletin for use on BBS's. DGBG is only one
of many such programs, but it supports more useful features
and is more visually appealing than any similar program this
author has seen. Among the features that DGBG supports:
* DGBG creates ANSI (.ANS), ASCII (.ASC), and
AVATAR (.AVT) files.
* Each news item is displayed in a window of its
own.
* Input text is automatically line wrapped for an
optimal fit within display windows.
* Each window can be independently positioned, and
will overlap previously drawn windows.
* The background color, text color, frame color,
frame style, highlight color, and title can be
set individually for each window.
* Sequential display of windows with overlap is
supported in ASCII, ANSI, and AVATAR output files.
How to use DGBG
DGBG works in much the same way as other news bulletin
compilers. Like other news bulletin compilers, this program
scans an input file containing message text and control
parameters. The information contained within that file is
used to produce up to three output files, one containing ANSI
terminal control information, one a flat ASCII file, and the
last an optional AVATAR output file. The ASCII file contains
no terminal control information other than screen clearing
codes. Both files are elaborately formatted and decorated to
produce a visually appealing display.
The default input file for DGBG is called DGBG.TXT, and it
should be present within the directory that DGBG is invoked
from. DGBG will look for that file when it starts up, and
will abort with an error message if the file is not found.
DGBG can be forced to process a file other than DGBG.TXT by
providing the name of that file on the command line. If this
option is used, all references to DGBG.TXT in this document
can be considered to apply to the file specified.
2
Since DGBG.TXT contains both message text and formatting
commands, there must be a way for DGBG to distinguish
between the two. Formatting commands are therefore dis-
tinguished from message text by the fact that all commands
start with an asterisk ("*") and must begin in the first
text column. Without going into any detail as yet into what
the various commands mean, the following simple illustration
should show how commands are distinguished from text:
*Title Simple Illustration
This is a line of text
This is another line of text
*Style 4
*Window
All the lines beginning with an asterisk are formatting
commands, and all the rest of the lines (including the blank
one) are lines of message text.
Text input into the DGBG control file is a fairly straight-
forward task. Simply entering the text in paragraph format
will work. Line length is not especially important since
any input text will automatically be line wrapped to a length
of 60 characters per line. Input lines should not exceed 110
characters though, for longer lines may be truncated.
The line wrapping algorithm in DGBG keys on two things to
determine when to end a paragraph of text and begin a new one.
The first of these is a blank line. Any blank line will cause
DGBG to finish the current paragraph, skip a line, and begin
the next one. Vertical spacing with blank lines is thereby
preserved in the output files. A line beginning with a space
(such as a paragraph indention) will also trigger the end of
the current paragraph and the beginning of a new one. In this
case however, no lines are skipped between paragraphs. The
indention is preserved however, and thus horizontal spacing is
preserved in the output file. DGBG's line wrapping algorithm
does NOT remove extra blanks between individual words unless a
line break also occurs between those words.
The real power of DGBG is not derived merely from simple text
input, however. What makes DGBG special is the ability to
configure multiple overlapping windows, each with its own
individual characteristics. This is accomplished through the
use of a set of formatting commands.
DGBG's commands essentially fall into two categories: the
Window command and all the rest. All the commands except the
Window command are used to set various parameters which will
be used when the window command is invoked to determine what
characteristics (such as location, color, etc.) a window will
have when it is displayed. Each time a command other than the
3
Window command (with some exceptions, as will be seen later)
is invoked, the value of the setting controlled by that command
is changed. The order of commands is not important, as long as
all the desired characteristics of a command are established
before the Window command is used. A command occurring twice
before a Window command will not cause an error. The last
value given will be the one used when the window is written to
the output files.
Text is processed in a manner similar to the way non-Window
commands are processed. It is saved up until a Window
command is reached, and then it is all put into the display
window at once.
DGBG Commands
Following this section is an alphabetical listing of all
the commands supported by DGBG. For each command, both a
description and a syntax definition are given.
This document describes the function of DGBG's commands in
ordinary English, and therefore their purpose should be
reasonably self evident. The syntax definitions may not be
so obvious however, and so the following descriptions are
given:
*Command <1..10>
This syntax means that the (purely hypothetical) command
"Command" would accept an integer between 1